/**
 * Created by Administrator on 2018/6/16 0016.
 */
    $(function(){//导航效果
        $(".nav_center>ul>li>a").mouseenter(function(){
            $(this).addClass("nav_center_active");
        });
        $(".nav_center>ul>li>a").mouseleave(function(){
            $(this).removeClass("nav_center_active");
        });
        //固定导航
        var topheight=$(".header").height();
        $(window).scroll(function(){
            var docScrollTop = $(document).scrollTop();
            if (docScrollTop >= topheight){
                $(".nav").css({
                    "background-color": "grey",
                    "position": "fixed",
                    "top": 0,
                })
            }
            else {
                $(".nav").css({
                    "background-color": "white",
                    "position": "static"
                });
            }

        });
        //跟随选项卡
        $(window).scroll(function(){
            var top1 = $(window).scrollTop() + 200;
            // $(".img-ad").css("top", top);

            var scoheight=$(document).scrollTop();
            if (scoheight>480){
                $(".tubiao").stop().animate({ top: top1 }, 600);

            }
            else{
                $(".tubiao").css({
                    position:"absolute" ,
                    right:" 12.93%",
                    top:" 30em"

                })
            }

        });
        //鞋图鼠标经过改变透明度
        $(".new_shoes_right_bottom>ul>li>img").mouseenter(function(){
            $(this).css("opacity",0.4);
        });
        $(".new_shoes_right_bottom>ul>li>img").mouseleave(function(){
            $(this).css("opacity",1);
        });


    })
